<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Lotto</title>
<link href="../css/member_global.css?t={ctime}" rel="stylesheet" type="text/css" />
<link href="../css/member_main_lot_all.css?t={ctime}" rel="stylesheet" type="text/css">
<link href="../css/member_main_lot_b1.css?t={ctime}" rel="stylesheet" type="text/css">
<script Language="JavaScript1.2" type="text/javascript" src="../inc/checkdata_{intLang}.js"></script>
<script Language="JavaScript">
<!--
function finalcheck(){
	with(document.beMemberFrm){
		if(isEmpty(document.beMemberFrm.Password_o.value)){
			alert("{PWD_old_Insert}");
			document.beMemberFrm.Password_o.focus();
			return;
		}else if(isEmpty(document.beMemberFrm["Password"].value)){
			alert("{PWD_new_Insert}");
			document.beMemberFrm["Password"].focus();
			return;
		}else if(isEmpty(document.beMemberFrm.Password_c.value)){
			alert("{PWD_confirm_Insert}");
			document.beMemberFrm.Password_c.focus();
			return;
		}

		if(Password.value.length < 4 && Password.value.length > 0){
			alert("{PWD_alert1}");
			Password.focus();
		}else if(Password.value == Password_o.value){
			alert("{PWD_alert7}");
			Password.focus();
		}else if(Password.value != Password_c.value){
			alert("{PWD_alert2}");
			Password.focus();
		}else if(illegalPassword(Password.value)){
			alert("{PWD_alert3}");
			Password.focus();
		}else if(illegalPassword2(Password.value)){
			alert("{PWD_alert8}");
			Password.focus();
		}else{
			submit();
		}
	}
}

	function illegalPassword(idd){
		var xid =  idd.toUpperCase();
		if(idd.length == 0)  return  false;
		var c  =  xid.charAt(0);
		for(var i = 0; i < xid.length; i++) {
			c = xid.charAt(i);
			if(!((('0'<=c)&&(c<='9'))||(('A'<=c)&&(c<='Z')) || c=='@' || c<='_')) return true;
		}
		return  false;		
	}

	function illegalPassword2(idd){
		var xid =  idd.toUpperCase();
		var c  =  xid.charAt(0);
		for(var i = 1; i < xid.length; i++) {
			if(c != xid.charAt(i))return false;
		}
		return true;
	}
//-->
</script>
</head>

<body oncontextmenu="window.event.returnValue=false" ondragstart="window.event.returnValue=false" onselectstart="event.returnValue=false">
<!-- 檢驗資料用 //-->
<form name="CheckDataForm">
	<input type="hidden" name="required" value="text;Password_o;{PWD_old}">
	<input type="hidden" name="required" value="text;Password;{PWD_new}">
	<input type="hidden" name="required" value="text;Password_c;{PWD_confirm}">
</form>
<!-- End .//-->

<!--樣式2-->
<div class="topStyle_2">
<table class="mtop" width="725" border="0" cellspacing="0" cellpadding="0">
<tr>
	<td align="center"><table width="100%" border="0" cellpadding="0" cellspacing="0" height="25">
		<tr>
			<td align="center" class="menu_title">{PWD}</td>
			<td align="right" valign="top" class="mictxt">&nbsp;</td>
		</tr>
	</table></td>
</tr>
<tr class="menu_tab">
    <td nowrap="nowrap" class="menu_tab" >&nbsp;</td>
</tr>
</table>
</div>

<table width="725" border="0" cellpadding="0" cellspacing="0" class="mbtab_mbnu2">
<tr class="mbtitle">
	<td align="center">{PWD}</td>
</tr>
<!-- @ Force Start @//-->
<tr class="mcen">
	<td align="left" class="mbline">
			 Dear {Account} ({Name})<b> : </b><br /><br />
			 {ForceTip}
	</td>
</tr>
<!-- @ Force End @//-->
<tr align="right" class="mcen">
	<td align="center" class="mbline">
		<form name="beMemberFrm" method="Post" action="mem_pwdupdate.php">
		<input type="hidden" name="Force" value="{Force}">

		<table width="500" cellpadding="0" cellspacing="5">
		<tbody>
		<tr>
			<td width="197" height="30" align="right">{PWD_old}</td>
			<td width="298" height="30" align="left"><input name="Password_o" type="password" /></td>
		</tr>
		<tr>
			<td height="30" align="right">{PWD_new}</td>
			<td height="30" align="left"><input name="Password" type="password" /></td>
		</tr>
		<tr>
			<td height="30" align="right">{PWD_confirm}</td>
			<td height="30" align="left"><input name="Password_c" type="password" /></td>
		</tr>
		<tr>
			<td height="30" colspan="2" align="center"><input type="button" class="zabottonR" onclick="finalcheck()" value="{Submit}" />
			<input type="reset" class="zabotton" value="{Reset}" /></td>
		</tr>
		</tbody>
		</table>
		</form>
	</td>
</tr>
<tr class="mcen">
	<td align="left" class="mbline">
		<div style="margin-left: 20px">{PWD_Tip}</div>
	</td>
</tr>
</table>

</body>
</html>
